package com.neusoft.neuiotms.dcam.fixed.vo;

import java.util.Date;

import javax.validation.constraints.NotBlank;

import org.hibernate.validator.constraints.Length;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.handler.inter.IExcelDataModel;
import cn.afterturn.easypoi.handler.inter.IExcelModel;
import lombok.Getter;
import lombok.Setter;

/**
 * 消耗品导入模板
 *
 * @author sunchf
 */
@Setter
@Getter
public class ConsumptionImportVO implements IExcelDataModel, IExcelModel {

    @Excel(name = "资产名称", orderNum = "0", width = 30)
    @NotBlank(message = "资产名不能为空")
    @Length(max = 255, message = "资产名不能超过{max}位")
    private String name;

    @NotBlank(message = "资产类型不能为空")
    @Length(max = 255, message = "资产类型不能超过{max}位")
    @Excel(name = "小分类", orderNum = "1", width = 20)
    private String assetTypeName;

    @Excel(name = "购置日期", orderNum = "2", databaseFormat = "yyyy.MM.dd", format = "yyyy.MM.dd", width = 20)
    private Date purchaseDate;

    @Excel(name = "品牌", orderNum = "3", width = 20)
    private String brand;

    @Excel(name = "规格型号", orderNum = "4", width = 20)
    private String specifications;

    @Excel(name = "位置", orderNum = "5", width = 20)
    private String locationName;

    @Excel(name = "数量", orderNum = "6")
    private int amount = 1;

    @Excel(name = "计量单位", orderNum = "7")
    private String measureUnit;

    @Excel(name = "金额", orderNum = "8")
    private Double money;

    @Excel(name = "用途", orderNum = "9")
    private String purpose;

    @Excel(name = "备注", orderNum = "10", width = 30)
    private String note;

    private String belongs;

    private String categories;

    private int rowNum;

    private String errorMsg;

    @Override
    public Integer getRowNum() {
        return this.rowNum;
    }

    @Override
    public void setRowNum(final Integer rowNum) {
        this.rowNum = rowNum;
    }

    @Override
    public String getErrorMsg() {
        return this.errorMsg;
    }

    @Override
    public void setErrorMsg(final String errorMsg) {
        this.errorMsg = errorMsg;
    }

}
